perm filename XIP.JAM[UP,DOC]2 blob sn#442898 filedate 1979-05-18 generic text, type C, neo UTF8
COMMENT ⊗   VALID 00011 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00002 00002	USER PROGRAM DOCUMENTATION               OCTOBER 1973 - AUGUST 1975
C00005 00003	INTRODUCTION:
C00009 00004	ESCAPE CHARACTER:
C00011 00005	DEFAULT FONTS:
C00013 00006	STANFORD FONT FILE FORMAT.---------------------------------
C00014 00007	FONT SELECT DELIMITERS:
C00017 00008	INDIRECT FILE COMMANDS:
C00019 00009	CARRIAGE CONTROL COMMMANDS.
C00021 00010	GRAPHICS FIGURES:
C00024 00011	TEXT JUSTIFICATION:
C00029 ENDMK
C⊗;
USER PROGRAM DOCUMENTATION               OCTOBER 1973 - AUGUST 1975

                    XIP - XEROX IMMEDIATE PRINT 
                          BRUCE G. BAUMGART

ABSTRACT: XIP converts files of text, III buffers, graphics and video
into binary image rasters which are then printed on the XGP. 

WARNING: XIP uses the core lock UUO will running  in 80K to 120K core
images; which is  widely considered a public nuisance. The use of XIP
is not encouraged and should only be attempted where PUB & POX fail. 

ACKNOWLEDGEMENT: Tovar Mock  made several early contributions  to XIP
and Andy Moorer has made several recent contributions.  The design of
Robert  Mass's  POX  and  Larry  Tesler's  PUB  have   naturally  had
substantial influence on XIP, since XIP is really a failed attempt to
combine POX and PUB. 

INTRODUCTION:

	XIP converts  files of text,  graphics and video  into binary
image rasters which are then printed on the XGP.  XIP's scanner has a
command mode and a print  mode; the scanner starts taking  characters
in  command  mode  from  the  portion of  the  monitor  command  line
following  the first semicolon: R XIP;<xip-command-string>.   Usually,
the  first  XIP command  in  the  monitor  command  line  is  a  file
indirection.   When in command mode, the  only character for entering
text mode is the right curly  braket "}".  When in text  mode, almost
every character is printed into an XGP bit raster. When in text mode,
the  only character  for  entering command  mode is  the  right curly
bracket "{".

THE XGP PAGE RASTER:

	The logical  page size  is 1900  rows by  1260 columns.   The
physical  page size is 8.5"  by 11".   The XGP is adjusted  so that a
single row or column  is one two hundreth of  an inch wide; which  is
the same as saying  that there are 200 rows (or  columns) to an inch;
or equivalently, there are 6 XGP pixels to the millimeter. 

ESCAPE CHARACTER:

	The XIP text escape character  is  left curly bracket.  The
escape  character  terminates TEXT-MODE  and returns  control  to the
command scanner which is COMMAND-MODE.


FONT SPECIFICATION:

F<chr>			Select font number <chr>.
M<i><font file name>;	Make font number <n> out of filename.

	You must  be in  command mode to  select a  font.  If  a font
select  command "F"  is done  before  a make  font command;  then the
following default font names will be used for the  corresponding font
numerals:

	Thus if  you  use the  default fonts,    you do  not have  to
declare any  font file names; but  if you do a  "Make a font" command
the default filename is lost. In either event, a font is  selected by
the capital-F  command followed by  a font numeral. Starting  in text
mode,  the sequence  to  change a  font is  "{F<numeral>}" which
will select the desired font and re-enter text mode.
	You can also use the font delimiters  to directly switch to a
prespecified font without having to enter and exit command mode. 

DEFAULT FONTS:

FIXED WIDTH FONTS.
	LPT		;1	LINE PRINTER.
	FIX13X		;2	FIXED WIDTH FONTS. (III chr size 1)
	FIX20		;3	(III chr size 2)
	FIX25		;4	(III chr size 3)
	FIX30		;5	(III chr size 4)
	FIX40		;6	(III chr size 5)
NEWS GOTHIC.
	NGR13		;7	NEWS GOTHIC ROMAN.
	NGR20		;8
	NGR25		;9	LIGHTFACE.
	NGB25		;A	BOLDFACE.
	NGR30		;B
	NGB30		;C
	NGR40		;D
FANCY OR IRREGULAR FONTS.
	XMAS25		;E	PSEUDO OLDE ENGLISH.
	BEESIX		;F
	GRK25		;G	GREEK.
	SET1		;H	TOVAR'S CREATION.
	SUB		;I
	SUP		;J
	XMAS40		;K
	BUCK75		;L
BODONI.
	BDR25		;M
	BDI25		;N
	BDJ25		;O
	BDR25X		;P
	BDR30		;Q
	BDB30		;R
	BDR40		;S
	BDI40		;T
	BDR66		;U
	CHS50		;V
	0		;W
BASKERVILLE.
	BASB30		;X	BOLDFACE.
	BASL30		;Y	LIGHTFACE.
	BASI30		;Z	ITALIC.

STANFORD FONT FILE FORMAT.---------------------------------
Just for your information:

WORDS 0-177:	XWD CHARACTER_WIDTH,CHARACTER_ADDRESS
WORDS 200-237:	CHARACTER_SET_NUMBER ↔ HEIGHT ↔	MAX_WIDTH (IN BITS)
		BASE LINE (BITS FROM TOP OF CHARACTER)
WORDS 240-377:	ASCIZ/FONT DESCRIPTION/
REMAINDER OF FILE:
	    EACH CHARACTER:
		CHARACTER_CODE,,WORD_COUNT+2
		ROWS_FROM_TOP,,DATA_ROW_COUNT
		BLOCK WORD_COUNT
--------------------------------------------------------------------⊗
FONT SELECT DELIMITERS:

	The five pairs  of characters: pointy brackets,  parentheses,
square  brackets,   horizontal horse shoes  and angle-bars;  are font
select  delimiters.  In  command   mode,  the  left  delimiters   are
declaration commands that take a  font numeral argument. For example,
to  declare subscripts under  square brakets; an italics under pointy
brakets; and  Christmas under the  angle-bars the following  commands
would be used:

	{[I<C≤E}

	TEST: ≤OLDE ENGLISH CHRISTMAS≥  A[1,2] + B[X+B] = C[π/2]
	TEST <TEST>	TEST <TEST>	TEST <TEST>

	When you switch fonts  with a font select delimiter,  the old
font is  saved, so that when you switch back with  >, ≥, ], or ⊃, the
old font is selected. 

FONT CHARACTERISTICS: SIZE, STYLE, THICKNESS.
_____________________________________________________________________
	The proliferation of  font file names can be  comprehended by
understanding  the  abbreviations  for  the  features  that are  most
variable: size, style and thickness.

	Most font  file names include  the numerals 13,   25,  30, or
40;  which is the  maximum height  of the font  in XGP units.  An XGP
unit is 1/200 of an inch; the usual printer's measure is  the "point"
which is  a 1/72  of an  inch; traditional type  font sizes  also are
refered to by the names given in the following table:

   SIZE NAME		POINTS		XGP-UNITS    CLOSEST XGP-SIZE

   Diamond		4.5		12.50		13
   Bourgeois		9		25		25
   Small Pica		11		30.56		30
   Pica			12		33.33
   English		14		38.89		40
   Columbian		16		44.45
   Great Primer		18		50

	The thickness of the font may be denoted by X-extra thick;
L-light; and I-italics.

INDIRECT FILE COMMANDS:
_____________________________________________________________________
@<filename>;	Print text starting at XGP pen postion.
⊗<filename>;	Place upper left of image at XGP pen position.
*<filename>;	Place center of image at XGP pen position.

	The "@"  indirect command  causes XIP  to start printing  the
contents  of the  specified text  file.  The  "⊗" and  "*" indicate  a
binary picture file; video  files are distinguished from III  display
files because the  first word of a  video file is [-1]  and the first
word  of a III display file is a  positive word count. The "⊗" circle
cross indirection places the upper left most corner of the picture at
the  current XGP beam  position; while  the "*"  asterisk indirection
places the center of the picture at the current XGP beam position. 

CARRIAGE CONTROL COMMMANDS.
---------------------------------------------------------------------
λ<integer>	Set inter line spaceing to <integer> XGP lines.
Q		Go to next page


VECTORS:
_____________________________________________________________________
	V<row>,<column>;	Absolute visible vector.
	I<row>,<column>;	Absolute invisible vector.
	
The row  and column  arguments are  ASCII decimal  numerals.   If the
number  is preceeded by a  partial (∂), it is  taken as relative. For
instance, V∂-4,500; will  cause a displacement up  four rows, but  at
column 500 absolutely. Likewise, V∂10,∂-2;  will go down ten and left
two. 

   C<radius>,<angle 1>,<angle 2>;		Circular arc.
   R<radius1>,<arc-displacement>,<radius2>;	Radial vector.
   A<xlo>,<xhi>,<coef0>,<coef1>,...,<coefN>;	Arc polynomial.
   H<width>;					Set line heaviness

All arcs, that is <arc-displacement> and <arc-length> may be given in
radians, pi fraction expressions or degrees. If the absolute value is
greater than 2*π the quantity is assumed to be degrees.

GRAPHICS FIGURES:
_____________________________________________________________________
	B<dx>;		Square Box.
	B<dx>,<dy>;	Rectangular Box.
	D<dx>;		Square Diamond.
	D<dx>,<dy>;	Diamond.

	C<radius>;		Circle.
	E<radius1>,<radius2>;	Ellipse.
	H<radius1>,<radius2>;	Hyperbola.

	C<radius>,<α1>,<α2>;			Circular arc. α1, α2
						are starting and
						ending angles.
	E<radius1>,<radius2>,<x1>,<x2>;		Elliptical arc 
						from X1 to X2 and Y ≥ 0.
	H<radius1>,<radius2>,<x1>,<x2>;		Hyperbolic arc
						from X1 to X2 and Y ≥ 0.

	O<arc>;		Orientation about origin.
	L<x>,<y>;	Locate locus of orgin.
	X<scalex>,<scaley>;
			XGP units per delta X and delta Y unit.

	The "B" command  with one real  argument prints a  square box
centered  at the XGP beam  position whoes half width  (radius) is the
given number  of XGP  pixels.   The "B"  command  with two  arguments
prints a  rectangle centered  at the current  XGP beam  position. The
"Box"  command as well  as the  "Diamond",  "Circle",   "Ellipse" and
"Hyperbola" commands do not change the pseudo XGP  beam position. The
"D" diamond command  works like "B" box taking  one or two arguments;
if the second argument  is missing it is  assumed to be identical  to
the first argument.

	The "C" circle, "E"  ellipse and "H" hyperbola are  very much
alike  because they are  executed by  the same mechanism.  The circle
command with one argument draws a circle centered at the  current XGP
raster  position.  The  "E"  and  "H"  commands  with  two  arguments
automatically  plot both the upper (greater  than zero) and the lower
(less than  zero)  part  of the  appropriate  conic centered  at  the
current  beam position  with  the X-axis  radius given  by  the first
argument and the Y-axis radius given by the second argument.

TEXT JUSTIFICATION:

There are three text justification modes: justify automatic carriage
return linefeed mode; justify video mode; and justify usual to fill
to the left and right margins.  These commands do not need to be
terminated by a semi-colon.

JA	Justify Automatic CRLF Mode. This is normal (default) mode.

	Extra carriage returns are provided when the right margin
	is exceeded; and extra form feeds are provided when the
	bottom margin is exceeded.

JV	Justify Video Mode.

	Characters "appearing" beyond the margins are lost.
	
JU	Justify Usual Mode.

	Full normal left and right justification. A paragraph
is started with a TAB and terminated by one of five conditions:
1. CRLF CRLF; 2. CRLF TAB; 3. ESCAPE CHARACTER;	4. FORM FEED;
or 5. END OF FILE.

There are, in addition, two other justify modes that are orthogonal
to the above specifications. They are used to center or slam right a
single line of text then return to the previous mode. The only
problem is that they eat the first character on the line (currently)
so you have to start your line with a space or something. (this is
a bug)

JC	Center the following line then return to whatever mode
	you were in.

JR	Slam the following line to the right margin. Then return
	to whatever mode you were in.

In addition, you can set the "frame" for the justified text to fit
in. That is, you can specify four numbers that tell the left side,
the right side, the top, and the bottom of a box that the justified
text will go in. When it runs off the end of the box, a page eject
will happen and text will resume at the top of the box on the next
page.

W<col-min>,<col-max>,<row-min>,<row-max>;
	This sets the left side of the box to column <col-min>,
	the right side to column <col-max>, the top to <row-min>,
	and the bottom to <row-max>. The default settings are
	W0,1260,0,2200;

If you don't want to specify all of these things, you can delete
arguments from the end by just not giving them. For instance, if you
just want to set the left side and right side, you can say W0,1260;
without any top and bottom specification. You can't just set the top
and bottom though.

There is a problem with when these things take effect. The <row-min>
doesn't take effect until the next page. The <col-min> doesn't take
effect until the next line (except in JC mode), so you may wish to
start the following text with a carriage return. Likewise, if you
want the text to start on a particular row, the W command will not
automatically move you down to that row until the next page after you
give the command, therefore, you would have to give an I command to
get to the proper row.